package com.zh.service;

import com.github.pagehelper.PageInfo;
import com.zh.domain.User;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Transactional(readOnly = true)
public interface userService {
    /**
     * 添加用户
     * @param user
     * @return
     */
    @Transactional(readOnly = false)
    public boolean add(User user);
    /**
     * 删除用户
     * @param uuid
     * @return
     */
    @Transactional(readOnly = false)
    public boolean delete(Integer uuid);
    /**
     * 修改用户
     * @param user
     * @return
     */
    @Transactional(readOnly = false)
    public boolean update(User user);
    /**
     * 根据id查询
     * @param uuid
     * @return
     */
    public User getById(Integer uuid);
    /**
     * 查询全部
     * @return
     */
    public PageInfo<User> getAll(int page, int size);
    /**
     * 用户登录
     * @param userName
     * @param password
     * @return
     */
    public User login(String userName, String password);
}
